<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

include_once "config.php";
$username = $_POST['username'];
$content = $_POST['content'];
$time_at = time();

$sql = "INSERT INTO wish (
  username, 
  content,
  time_at
  )
  VALUES (
  '$username','$content','$time_at')";
   $result = $conn->query($sql);
   if($result===IRUE){
       echo "ok";
   }
   else {
       echo"falure"; 
   }
   header("location:index2.php");
